//
//  FillAdressSelectTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/27.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "FillAdressSelectTableViewCell.h"

@implementation FillAdressSelectTableViewCell{
    GLGWLabel * namePhoneLabel;
    GLGWLabel * warehouseLabel;
    GLGWLabel * warehouseAdressLabel;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        namePhoneLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self.contentView];
        [namePhoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(12));
            make.left.equalTo(self.contentView.mas_left).offset(kHeightProportion_In_iPhoneTriploid(15));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        namePhoneLabel.text = @"高博涵  18614071701";
        
        warehouseLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:self.contentView];
        [warehouseLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self->namePhoneLabel.mas_left);
            make.top.equalTo(self->namePhoneLabel.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(5));
            make.height.equalTo(self->namePhoneLabel.mas_height);
        }];
        warehouseLabel.text = @"北京1号仓库";
        
        warehouseAdressLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self.contentView];
        [warehouseAdressLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self->namePhoneLabel.mas_left);
            make.right.equalTo(self.contentView).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.top.equalTo(self->warehouseLabel.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(5));
            make.bottom.equalTo(@(-kHeightProportion_In_iPhoneTriploid(14)));
        }];
        warehouseAdressLabel.text = @"北京市朝阳区左家庄中街23号";
        warehouseAdressLabel.numberOfLines = 0;
    }
    return self;
}

- (void)setInforModel:(MyAdressModel_Infos *)inforModel
{
    _inforModel = inforModel;
    namePhoneLabel.text = [NSString stringWithFormat:@"%@  %@",inforModel.consignee,inforModel.phone];
    warehouseLabel.text = inforModel.warehouseName;
    warehouseAdressLabel.text = inforModel.address;
}

@end
